package com.lfy.modules.safety.statistics;

import cn.hutool.crypto.digest.DigestUtil;
import com.lfy.modules.safety.domain.BlogUvStatistics;
import com.lfy.modules.safety.statistics.vistor.VisitorRecordCache;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class test {
    private static List<BlogUvStatistics> buidResult(){
        List<BlogUvStatistics> result = Stream.iterate(0, i -> ++i).limit(7).map(item -> {
            System.out.println(item);
            BlogUvStatistics blogUvStatistics = new BlogUvStatistics();
            blogUvStatistics.setNum(0L);
            blogUvStatistics.setCreateTime(LocalDate.now().minusDays(item).toString());
            return blogUvStatistics;
        }).collect(Collectors.toList());
        return result;
    }
    public static String offsetDay(int day){
        LocalDateTime nano = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0).withNano(0);
        return nano.minusDays(day).toString();

    }
    public static void main(String[] args) {

      String test = "# Hello Editor\n" +
              "测试2测试是是是是是是是真的测试![](http://localhost:9000/blog/1/article/2024-05-08/wallhaven-l37exy_3840x2160_1715183441462.png)\n";
        String replace = test.replace("http://localhost:9000/blog", "https://www.lfy.top/blog");

        System.out.println(replace);

    }

}
